package com.tbit.uqbike.object.pojo.vo;

import com.tbit.uqbike.webmanager.util.csv.annotations.Csv;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class AccountDayStatDownloadAllOperateVO {

    @Csv(name = "运营收入金额")
    private BigDecimal operating_income_sum;
    @Csv(name = "运营收入笔数")
    private BigDecimal operating_income_cnt;

    @Csv(name = "运营支出金额")
    private BigDecimal operating_expenses_sum;
    @Csv(name = "运营支出笔数")
    private BigDecimal operating_expenses_cnt;


    @Csv(name = "骑行收入金额")
    private BigDecimal cycling_income_sum;
    @Csv(name = "骑行收入笔数")
    private BigDecimal cycling_income_cnt;

    @Csv(name = "骑行支出金额")
    private BigDecimal cycling_expenses_sum;
    @Csv(name = "骑行支出笔数")
    private BigDecimal cycling_expenses_cnt;


    @Csv(name = "用户罚款收入金额")
    private BigDecimal user_fine_income_sum;
    @Csv(name = "用户罚款收入笔数")
    private BigDecimal user_fine_income_cnt;

    @Csv(name = "用户罚款支出金额")
    private BigDecimal user_penalty_expenditure_sum;
    @Csv(name = "用户罚款支出笔数")
    private BigDecimal user_penalty_expenditure_cnt;


    private BigDecimal income_from_cycling_card_sum;
    private BigDecimal income_from_cycling_card_cnt;

    private BigDecimal bike_card_expenditure_sum;
    private BigDecimal bike_card_expenditure_cnt;


    private BigDecimal membership_card_income_sum;
    private BigDecimal membership_card_income_cnt;

    private BigDecimal membership_card_expenditure_sum;
    private BigDecimal membership_card_expenditure_cnt;


    private BigDecimal card_free_income_sum;
    private BigDecimal card_free_income_cnt;

    private BigDecimal charge_free_card_expenditure_sum;
    private BigDecimal charge_free_card_expenditure_cnt;


    private BigDecimal coupon_package_income_sum;
    private BigDecimal coupon_package_income_cnt;

    private BigDecimal coupon_package_expenditure_sum;
    private BigDecimal coupon_package_expenditure_cnt;


    @Csv(name = "用户购卡收入金额")
    private BigDecimal card_income_sum;
    @Csv(name = "用户购卡收入笔数")
    private BigDecimal card_cnt;
    @Csv(name = "用户购卡支出金额")
    private BigDecimal card_expend_sum;
    @Csv(name = "用户购卡支出笔数")
    private BigDecimal card_expend_cnt;


    public BigDecimal getCard_income_sum() {
        return (income_from_cycling_card_sum == null ? BigDecimal.ZERO : income_from_cycling_card_sum).add(membership_card_income_sum == null ? BigDecimal.ZERO : membership_card_income_sum)
                .add(card_free_income_sum == null ? BigDecimal.ZERO : card_free_income_sum).add(coupon_package_income_sum == null ? BigDecimal.ZERO : coupon_package_income_sum);
    }

    public BigDecimal getCard_cnt() {
        return (income_from_cycling_card_cnt == null ? BigDecimal.ZERO : income_from_cycling_card_cnt).add(membership_card_income_cnt == null ? BigDecimal.ZERO : membership_card_income_cnt)
                .add(card_free_income_cnt == null ? BigDecimal.ZERO : card_free_income_cnt).add(coupon_package_income_cnt == null ? BigDecimal.ZERO : coupon_package_income_cnt);
    }

    public BigDecimal getCard_expend_sum() {
        return (bike_card_expenditure_sum == null ? BigDecimal.ZERO : bike_card_expenditure_sum).add(membership_card_expenditure_sum == null ? BigDecimal.ZERO : membership_card_expenditure_sum)
                .add(charge_free_card_expenditure_sum == null ? BigDecimal.ZERO : charge_free_card_expenditure_sum).add(coupon_package_expenditure_sum == null ? BigDecimal.ZERO : coupon_package_expenditure_sum);
    }

    public BigDecimal getCard_expend_cnt() {
        return (bike_card_expenditure_cnt == null ? BigDecimal.ZERO : bike_card_expenditure_cnt).add(membership_card_expenditure_cnt == null ? BigDecimal.ZERO : membership_card_expenditure_cnt)
                .add(charge_free_card_expenditure_cnt == null ? BigDecimal.ZERO : charge_free_card_expenditure_cnt).add(coupon_package_expenditure_cnt == null ? BigDecimal.ZERO : coupon_package_expenditure_cnt);
    }
}
